An Incremental Slicing Method for Functional Programs

نویسندگان

  • Prasanna Kumar K.
  • Amitabha Sanyal
  • Amey Karkare
چکیده

Several applications of slicing require a program to be sliced with respect to more than one slicing criterion. Program specialization, parallelization and cohesion measurement are examples of such applications. Œese applications can bene€t from an incremental static slicing method in which a signi€cant extent of the computations for slicing with respect to one criterion could be reused for another. In this paper, we consider the problem of incremental slicing of functional programs. We €rst present a non-incremental version of the slicing algorithm which does a polyvariant analysis1 of functions. Since polyvariant analyses tend to be costly, we compute a compact context-independent summary of each function and then use this summary at the call sites of the function. Œe construction of the function summary is non-trivial and helps in the development of the incremental version. Œe incremental method on the other hand consists of a one-time pre-computation step that uses the non-incremental version to slice the program with respect to a €xed default slicing criterion and processes the results further to a canonical form. Presented with an actual slicing criterion, the incremental step involves a low-cost computation that uses the results of the pre-computation to obtain the slice. We have implemented a prototype of the slicer for a pure subset of Scheme, with pairs and lists as the only algebraic data types. Our experiments show that the incremental step of the slicer runs orders of magnitude faster than the non-incremental version. We have also proved the correctness of our incremental algorithm with respect to the non-incremental version.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Incremental Slicing Based on Data-Dependences Types

Program slicing is useful for assisting with software-maintenance tasks, such as program understanding, debugging, impact analysis, and regression testing. The presence and frequent usage of pointers, in languages such as C, causes complex data dependences. To function effectively on such programs, slicing techniques must account for pointerinduced data dependences. Although many existing slici...

متن کامل

Term Dependence Graphs 1

Program slicing is a method for decomposing programs by analyzing their data and control flow. It has many applications in the field of software engineering (like program debugging, testing, code reuse, maintenance, etc). The so called program dependence graph—a data structure that stores control and data dependences between the statements of imperative programs—is a key ingredient of many slic...

متن کامل

An Approach for UML based Scenario Oriented Slicing

Understanding a large software product is known as a very challenging task. One way that facilitate program understanding is program slicing. Slicing is an important decomposition technique for program understanding[3]. However, traditional slicing methods tend to produce too large slices for human inspection as modern programs are often huge and static program analyses are hard to be precise e...

متن کامل

Understanding Data Dependences in the Presence of Pointers

Understanding data dependences in programs is important for many software-engineering activities, such as program understanding, impact analysis, reverse engineering, and debugging. The presence of pointers, arrays, and structures can cause subtle and complex data dependences that can be difficult to understand. For example, in languages such as C, an assignment made through a pointer dereferen...

متن کامل

Slicing Functional Programs by Calculation

Program slicing is a well known family of techniques used to identify code fragments which depend on or are depended upon specific program entities. They are particularly useful in the areas of reverse engineering, program understanding, testing and software maintenance. Most slicing methods, usually targeting either the imperative or the object oriented paradigms, are based on some sort of gra...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1709.08016  شماره 

صفحات  -

تاریخ انتشار 2017